package Demo1;

public class FruitUtil {
    //计算苹果总价
    public static double calculateApplePrice(double weight,RedFujiApple  apple) {
        return weight*apple.getPrice();
    }
    //计算通用水果价格
    public static double calculateFruitPrice(double weight,Fruit fruit){
        return weight*fruit.getPrice();
    }
}
